import xlrd


class ExcelUtil:
    def __init__(self):
        return

    @staticmethod
    def getListByXlFile(XlFilePath: str):
        XlFilePath = XlFilePath.encode('utf-8')
        data = xlrd.open_workbook(XlFilePath)
        table = data.sheets()[0]
        print(table.nrows, table.ncols)
        _names = table.col_values(0)
        _numbers = table.col_values(1)
        _thisList = []
        # [0] is flag
        for i in range(table.nrows):
            _thisList.append([_names[i], _numbers[i]])
        print(_thisList)
        return _thisList
